package jmine.tec.utils.io.http.exception;

/**
 * HttpException
 * 
 * @author takeshi
 */
public class HttpException extends Exception {

    private final int httpResponse;
    
    private String errorBody = "";

    /**
     * @param httpResponse int
     */
    public HttpException(int httpResponse) {
        super("http error code: " + httpResponse);
        this.httpResponse = httpResponse;
    }

    /**
     * @param httpResponse int
     * @param message String
     */
    public HttpException(int httpResponse, String message) {
        super(message);
        this.httpResponse = httpResponse;
    }

    /**
     * @param httpResponse int
     * @param message String
     * @param cause cause
     */
    public HttpException(int httpResponse, String message, Throwable cause) {
        super(message, cause);
        this.httpResponse = httpResponse;
    }

    /**
     * @param httpResponse int
     * @param cause cause
     */
    public HttpException(int httpResponse, Throwable cause) {
        super(cause);
        this.httpResponse = httpResponse;
    }

    /**
     * @return the httpResponse
     */
    public int getHttpResponse() {
        return httpResponse;
    }

    /**
     * @return the errorBody
     */
    public String getErrorBody() {
        return errorBody;
    }

    /**
     * @param errorBody the errorBody to set
     */
    public void setErrorBody(String errorBody) {
        this.errorBody = errorBody;
    }

}
